<?php
/**
 * Layout of the organizations profile page
 *
 * @uses $vars['entity'], $vars['section']
 */ 

$form_vars = array(
	'enctype' => 'multipart/form-data',
	'class' => 'elgg-form-alt',
);

$org = get_entity(get_input('o'));
if(!$org->isManager())
{
	forward($org->getUrl());
}

$section = "";
switch ($vars['section'])
{
	case 'admins':
		$section = elgg_view('frontend/edit/edit_admins',$vars);
		break;
	default:
		$section = elgg_view_form('organizations/save',$form_vars);
		break;
}

if(get_input('ajax'))
{
	echo $section;
	die;
}

?>

<div class="elgg-body">
	<?php echo elgg_view('frontend/edit/tabs',$vars);?>
	<div id="section_content" syle="margin-top:10px;">
		<?php echo $section; ?>
	</div>
</div>